package com.fbs.wowo.attest.web;

import com.fbs.wowo.attest.entity.Attest;
import com.fbs.wowo.attest.service.AttestService;
import com.fbs.wowo.base.BaseController;
import com.fbs.wowo.base.Response;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 登记数据
 */
@RequestMapping("attest")
@RestController
public class AttestController extends BaseController {

    @Resource
    private AttestService attestService;

    /**
     * 添加登记数据
     * @param attest
     * @return
     */
    @PostMapping("insertAttest")
    public Response insertAttest(Attest attest){
        return success(attestService.insertSelective(attest));
    }


    //按作品ID查询登记详情
    @GetMapping("findAttestInfoByEssayId")
    public Response findAttestInfoByEssayId(String essayId){
        return success(attestService.findAttestInfoByEssayId(essayId));
    }


}
